package com.ysd.entity;

public class Module {

	private Integer id; // 模块编号
	private String name; // 模块名称
	private Integer parentId; // 父模块编号
	private String path; // 模块路径
	private Integer weight; // 模块权重
	private String ops;  // 预留字符串字段
	private Integer int0; //预留整数字段
	
	public Module() {
		super();
	}

	public Module(String name, Integer parentId, String path, Integer weight) {
		this.name = name;
		this.parentId = parentId;
		this.path = path;
		this.weight = weight;
	}

	public Module(Integer id, String name, Integer parentId, String path, Integer weight) {
		super();
		this.id = id;
		this.name = name;
		this.parentId = parentId;
		this.path = path;
		this.weight = weight;
	}

	public Module(String name, Integer parentId, String path, Integer weight, String ops, Integer int0) {
		this.name = name;
		this.parentId = parentId;
		this.path = path;
		this.weight = weight;
		this.ops = ops;
		this.int0 = int0;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getParentId() {
		return parentId;
	}

	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public Integer getWeight() {
		return weight;
	}

	public void setWeight(Integer weight) {
		this.weight = weight;
	}

	public String getOps() {
		return ops;
	}

	public void setOps(String ops) {
		this.ops = ops;
	}

	public Integer getInt0() {
		return int0;
	}

	public void setInt0(Integer int0) {
		this.int0 = int0;
	}

	@Override
	public String toString() {
		return "Modules [id=" + id + ", name=" + name + ", parentId=" + parentId + ", path=" + path + ", weight="
				+ weight + ", ops=" + ops + ", int0=" + int0 + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((int0 == null) ? 0 : int0.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result + ((ops == null) ? 0 : ops.hashCode());
		result = prime * result + ((parentId == null) ? 0 : parentId.hashCode());
		result = prime * result + ((path == null) ? 0 : path.hashCode());
		result = prime * result + ((weight == null) ? 0 : weight.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Module other = (Module) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (int0 == null) {
			if (other.int0 != null)
				return false;
		} else if (!int0.equals(other.int0))
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (ops == null) {
			if (other.ops != null)
				return false;
		} else if (!ops.equals(other.ops))
			return false;
		if (parentId == null) {
			if (other.parentId != null)
				return false;
		} else if (!parentId.equals(other.parentId))
			return false;
		if (path == null) {
			if (other.path != null)
				return false;
		} else if (!path.equals(other.path))
			return false;
		if (weight == null) {
			if (other.weight != null)
				return false;
		} else if (!weight.equals(other.weight))
			return false;
		return true;
	}
		
}
